Remove dist/action from main, build at release time#101
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
.github/workflows/release.yml
Outdated
| pnpm build | ||
| pnpm build:action |
There was a problem hiding this comment.
🚨 Missing pnpm install before build commands (high confidence)
The workflow runs pnpm build and pnpm build:action (lines 70-71) without first running pnpm install. Dependencies won't exist and the build will fail. The CI workflow correctly runs pnpm install --frozen-lockfile before building.
Suggested fix: Add pnpm install --frozen-lockfile before the build commands
| pnpm build | |
| pnpm build:action | |
| # Install dependencies | |
| pnpm install --frozen-lockfile | |
Identified by Warden via notseer · critical, high confidence
.github/workflows/release.yml
Outdated
| fi | ||
| # Commit artifacts to release branch | ||
| git add -f dist/action/ | ||
| git commit -m "build: Add action artifacts for ${TAG}" |
There was a problem hiding this comment.
🚨 Missing git user configuration before commit (high confidence)
The workflow runs git commit (line 75) without configuring git user.name and user.email. Git requires these to create commits and will fail with 'Author identity unknown'. The update-major-tag.yml workflow correctly sets these before committing.
Suggested fix: Add git config for user identity before the commit
| git commit -m "build: Add action artifacts for ${TAG}" | |
| # Configure git identity for commits | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
Identified by Warden via notseer · critical, high confidence
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
we need to figure out a path here but this prob isnt it |
Move ncc action bundle out of the main branch entirely. The update-major-tag workflow now builds the bundle and force-updates release tags to include it. Sourcemaps disabled from ncc output. - Gitignore all of dist/ (no more whitelist exceptions) - Remove dist/action/ from tracked files - Remove ncc build and git add from bump-version.sh - Update update-major-tag workflow to build ncc bundle, commit it, and force-update both version and major tags - Remove --source-map from ncc build command Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f4d1d36 to
f1ced52
Compare
Skip the commit if dist/action/ is already present and unchanged, so the workflow can be safely re-run for recovery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| run: pnpm build:action | ||
|
|
||
| - name: Commit bundle and update tags | ||
| run: | |
There was a problem hiding this comment.
Bug: The workflow uses $GITHUB_REF_NAME to create a release tag, but this variable is not reliably populated for release triggers, which could lead to incorrect tagging.
Severity: HIGH
Suggested Fix
Replace the usage of $GITHUB_REF_NAME in the bash script with ${{ github.event.release.tag_name }}. This can be achieved by passing it as an environment variable to the step before it is used, for example: env: RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}, and then using $RELEASE_TAG_NAME in the script.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/update-major-tag.yml#L32
Potential issue: In the `update-major-tag.yml` workflow, a script uses the
`$GITHUB_REF_NAME` environment variable to derive the version for creating a new git
tag. However, for workflows triggered by a `release` event, `GITHUB_REF_NAME` is not
guaranteed to be populated and may be empty. This will cause the script to attempt to
create a tag named `v`, which will either fail or corrupt the release tagging process.
This would break the GitHub Action for that release version. An earlier step in the same
workflow correctly uses `github.event.release.tag_name`, indicating this is likely an
oversight.
dist/artifacts from main. The ncc action bundle is now built and committed to release tags only by theupdate-major-tagworkflow.--no-source-map-register).sourcemap-register.cjsfrom git tracking.Before:
dist/action/was committed to main on every release viabump-version.sh. Sourcemaps, declaration files, and type maps accumulated in git history.After: Main has zero build artifacts. The
update-major-tagworkflow builds the ncc bundle, commits only the bundle files to a detached commit, and force-updates both the version tag (v0.7.0) and major tag (v0). npm publishing is unaffected (Craft downloads pre-built tarballs from CI artifacts).See
specs/release-process.mdfor the full release flow documentation.